package com.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * AI消息表
 *
 * @TableName ai_messages
 */
@TableName(value = "ai_messages")
@Data
public class AiMessage implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     * 消息ID
     */
    @TableId(value = "message_id", type = IdType.AUTO)
    private Long messageId;
    /**
     * 对话ID
     */
    @TableField(value = "conversation_id")
    private Long conversationId;
    /**
     * 消息内容
     */
    @TableField(value = "content")
    private String content;
    /**
     * 消息角色：user-用户消息，assistant-AI回复
     */
    @TableField(value = "role")
    private String role;
    /**
     * 创建时间
     */
    @TableField(value = "created_at")
    private Date createdAt;
    /**
     * 更新时间
     */
    @TableField(value = "updated_at")
    private Date updatedAt;
    /**
     * 消息状态：0-正常，1-已撤回
     */
    @TableField(value = "status")
    private Integer status;
}